home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / adainc / a-taside.ads < prev    next >
Text File  |  1996-01-30  |  2KB  |  57 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT RUNTIME COMPONENTS                          --
  4. --                                                                          --
  5. --              A D A . T A S K _ I D E N T I F I C A T I O N               --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.7 $                              --
  10. --                                                                          --
  11. -- This specification is adapted from the Ada Reference Manual for use with --
  12. -- GNAT.  In accordance with the copyright of that document, you can freely --
  13. -- copy and modify this specification,  provided that if you redistribute a --
  14. -- modified version,  any changes that you have made are clearly indicated. --
  15. --                                                                          --
  16. ------------------------------------------------------------------------------
  17.  
  18. with System;
  19. with System.Tasking;
  20. with Unchecked_Conversion;
  21.  
  22. package Ada.Task_Identification is
  23.  
  24.    type Task_Id is private;
  25.  
  26.    Null_Task_Id : constant Task_Id;
  27.  
  28.    function  "=" (Left, Right : Task_Id) return Boolean;
  29.    pragma Inline ("=");
  30.  
  31.    function Image (T : Task_Id) return String;
  32.  
  33.    function Current_Task return Task_Id;
  34.    pragma Inline (Current_Task);
  35.  
  36.    procedure Abort_Task (T : in out Task_Id);
  37.    pragma Inline (Abort_Task);
  38.  
  39.    function Is_Terminated (T : Task_Id) return Boolean;
  40.    pragma Inline (Is_Terminated);
  41.  
  42.    function Is_Callable (T : Task_Id) return Boolean;
  43.    pragma Inline (Is_Callable);
  44.  
  45. private
  46.    type Task_Id is access Integer;
  47.  
  48.    function Convert_Ids is new
  49.      Unchecked_Conversion (System.Tasking.Task_ID, Task_Id);
  50.  
  51.    function Convert_Ids is new
  52.      Unchecked_Conversion (Task_Id, System.Tasking.Task_ID);
  53.  
  54.    Null_Task_ID : constant Task_Id := Convert_Ids (System.Tasking.Null_Task);
  55.  
  56. end Ada.Task_Identification;
  57.